package com.codeoss.framework.data.metadata;

import java.util.List;

import com.codeoss.framework.util.LookupInfo;

/**
 * 数据库列 元数据
 * @author nethaoke
 * 2020-06-03
 */
public class Column {
	private String columnName;
	private String name;
	private String dataType;
	private String sqlType;
	private int length;
	private int precision;
	private boolean nullable=true;
	private boolean unique;
	private boolean parentColumn;
	private boolean primaryKey;
	private String property;
	private LookupInfo lookupInfo;
	private Table table;
	private String defaultValueExpression;
	private String requiredExpression;
	private String readOnlyExpression;
	
	private boolean codeColumn;
	private boolean nameColumn;
	private boolean exportColumn;
	private boolean storeColumn=true;
	private boolean allowLogging;
	private List<ColumnValidationRule> columnValidationRuleList;
	
	
	public String getColumnName() {
		return columnName;
	}
	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDataType() {
		return dataType;
	}
	public void setDataType(String dataType) {
		this.dataType = dataType;
	}
	public String getSqlType() {
		return sqlType;
	}
	public void setSqlType(String sqlType) {
		this.sqlType = sqlType;
	}
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public int getPrecision() {
		return precision;
	}
	public void setPrecision(int precision) {
		this.precision = precision;
	}
	public boolean isNullable() {
		return nullable;
	}
	public void setNullable(boolean nullable) {
		this.nullable = nullable;
	}
	public boolean isUnique() {
		return unique;
	}
	public void setUnique(boolean unique) {
		this.unique = unique;
	}
	public boolean isPrimaryKey() {
		return primaryKey;
	}
	public void setPrimaryKey(boolean primaryKey) {
		this.primaryKey = primaryKey;
	}
	public String getProperty() {
		return property;
	}
	public void setProperty(String property) {
		this.property = property;
	}
	public LookupInfo getLookupInfo() {
		return lookupInfo;
	}
	public void setLookupInfo(LookupInfo lookupInfo) {
		this.lookupInfo = lookupInfo;
	}
	public Table getTable() {
		return table;
	}
	public void setTable(Table table) {
		this.table = table;
	}
	public String getDefaultValueExpression() {
		return defaultValueExpression;
	}
	public void setDefaultValueExpression(String defaultValueExpression) {
		this.defaultValueExpression = defaultValueExpression;
	}
	public boolean isParentColumn() {
		return parentColumn;
	}
	public void setParentColumn(boolean parentColumn) {
		this.parentColumn = parentColumn;
	}
	public String getRequiredExpression() {
		return requiredExpression;
	}
	public void setRequiredExpression(String requiredExpression) {
		this.requiredExpression = requiredExpression;
	}
	public String getReadOnlyExpression() {
		return readOnlyExpression;
	}
	public void setReadOnlyExpression(String readOnlyExpression) {
		this.readOnlyExpression = readOnlyExpression;
	}
	public List<ColumnValidationRule> getColumnValidationRuleList() {
		return columnValidationRuleList;
	}
	public void setColumnValidationRuleList(List<ColumnValidationRule> columnValidationRuleList) {
		this.columnValidationRuleList = columnValidationRuleList;
	}
	public boolean isCodeColumn() {
		return codeColumn;
	}
	public void setCodeColumn(boolean codeColumn) {
		this.codeColumn = codeColumn;
	}
	public boolean isNameColumn() {
		return nameColumn;
	}
	public void setNameColumn(boolean nameColumn) {
		this.nameColumn = nameColumn;
	}
	public boolean isExportColumn() {
		return exportColumn;
	}
	public void setExportColumn(boolean exportColumn) {
		this.exportColumn = exportColumn;
	}
	public boolean isStoreColumn() {
		return storeColumn;
	}
	public void setStoreColumn(boolean storeColumn) {
		this.storeColumn = storeColumn;
	}
	public boolean isAllowLogging() {
		return allowLogging;
	}
	public void setAllowLogging(boolean allowLogging) {
		this.allowLogging = allowLogging;
	}
}
